home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / vm / vm-5.33beta / vm-vars.el < prev    next >
Encoding:
Text File  |  1993-04-11  |  34.1 KB  |  766 lines

  1. ;;; VM user and internal variable initialization
  2. ;;; Copyright (C) 1989, 1990, 1991 Kyle E. Jones
  3. ;;;
  4. ;;; This program is free software; you can redistribute it and/or modify
  5. ;;; it under the terms of the GNU General Public License as published by
  6. ;;; the Free Software Foundation; either version 1, or (at your option)
  7. ;;; any later version.
  8. ;;;
  9. ;;; This program is distributed in the hope that it will be useful,
  10. ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. ;;; GNU General Public License for more details.
  13. ;;;
  14. ;;; You should have received a copy of the GNU General Public License
  15. ;;; along with this program; if not, write to the Free Software
  16. ;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. (defvar vm-primary-inbox "~/INBOX"
  19.   "*Mail is moved from the system mailbox to this file for reading.")
  20.  
  21. (defvar vm-crash-box "~/INBOX.CRASH"
  22.   "*File in which to store mail temporarily while it is transferrred from
  23. the system mailbox to the primary inbox.  If the something happens
  24. during this mail transfer, any missing mail will be found in this file.
  25. VM will do crash recovery from this file automatically at startup, as
  26. necessary.")
  27.  
  28. (defvar vm-spool-files
  29.   (or (and (setq vm-spool-files (getenv "MAILPATH"))
  30.        (setq vm-spool-files
  31.          (vm-parse vm-spool-files
  32.                "\\([^:%?]+\\)\\([%?][^:]*\\)?\\(:\\|$\\)")))
  33.       (and (setq vm-spool-files (getenv "MAIL"))
  34.        (setq vm-spool-files (list vm-spool-files))))
  35.   "*If non-nil this variable's value should be a list of strings naming files
  36. that VM will check for incoming mail instead of the where VM thinks your
  37. system mailbox is.  This variable can be used to specify multiple spool files
  38. or to point VM in the right direction if its notion of your system mailbox is
  39. incorrect.
  40.  
  41. VM will default to the value of the shell environmental variables
  42. MAILPATH or MAIL if either of these variables are defined.")
  43.  
  44. (defvar vm-visible-headers
  45.   '("From:" "Sender:" "Resent-From"
  46.     "To:" "Apparently-To:" "Cc:"
  47.     "Subject:"
  48.     "Date:" "Resent-Date:")
  49.   "*List of headers that should be visible when VM first displays a message.
  50. These should be listed in the order you wish them presented.
  51. Regular expressions are allowed.")
  52.  
  53. (defvar vm-invisible-header-regexp nil
  54.   "*Non-nil value should be a regular expression that tells what headers
  55. VM should NOT normally display when presenting a message.  All other
  56. headers will be displayed.  The variable vm-visible-headers specifies
  57. the presentation order of headers; headers not matched by
  58. vm-visible-headers are displayed last.
  59.  
  60. Nil value causes VM to display ONLY those headers specified in
  61. vm-visible-headers.")
  62.  
  63. (defvar vm-highlighted-header-regexp nil
  64.   "*Regular expression that matches the beginnings of headers that should
  65. be highlighted when a message is first presented.  For exmaple setting
  66. this variable to \"^From\\\\|^Subject\" causes the From: and Subject:
  67. headers to be highlighted.")
  68.  
  69. (defvar vm-preview-lines 0
  70.   "*Non-nil value N causes VM to display the visible headers + N lines of text
  71. from a message when it is first presented.  The message is not actually
  72. flagged as read until it is exposed in its entirety.  Nil causes VM not
  73. to preview a message at all; it is displayed in its entirety when first
  74. presented and is immediately flagged as read.")
  75.  
  76. (defvar vm-preview-read-messages t
  77.   "*Non-nil value means to preview messages even if they've already been read.
  78. A nil value causes VM to preview messages only if new or unread.")
  79.  
  80. (defvar vm-auto-next-message t
  81.   "*Non-nil value causes VM to use vm-next-mesage to advance to the next
  82. message in the folder if the user attempts to scroll past the end of the
  83. current messages.  A nil value disables this behavior.")
  84.  
  85. (defvar vm-honor-page-delimiters nil
  86.   "*Non-nil value causes VM to honor pages delimiters (as specified by the
  87. page-delimiter variable) when scrolling through a message.")
  88.  
  89. (defvar vm-window-configuration-file nil
  90.   "*Non-nil value should be a string that tells VM where to load
  91. and store its window configuration information.  The window
  92. configuration information is loaded automatically the first time
  93. you run VM in an Emacs session, and tells VM how to set up
  94. windows depending on what you are doing inside VM.
  95.  
  96. The command vm-save-window-configuration (normally bound to `WS')
  97. lets you update this information; see its documentation for more
  98. information.")
  99.  
  100. (defvar vm-confirm-quit 0
  101.   "*Value of t causes VM to always ask for confirmation before quitting
  102. a VM visit of a folder.  A nil value means VM will ask only when messages
  103. will be lost unwittingly by quitting, i.e. not removed by intentional
  104. delete and expunge.  A value that is not nil and not t causes VM to ask
  105. only when there are unsaved changes to message attributes, or when messages
  106. will be unwittingly lost.")
  107.  
  108. (defvar vm-retain-message-order 0
  109.   "*Non-nil value causes VM to save the message presentation order
  110. when the folder is saved.  The next time the folder is visited
  111. the saved presentation order will be used.
  112.  
  113. A value of t causes VM to consider message order changes
  114. sufficient reason to mark the folder buffer as modified.  This
  115. will ensure that message order changes will be saved even if no
  116. other buffer modifications (e.g. deleting messages, or reading
  117. unread message) are made.
  118.  
  119. A value that is not nil and not t causes VM note the message
  120. order changes, but not to save them unless there are other folder
  121. buffer modifications that need saving.")
  122.  
  123. (defvar vm-folder-directory nil
  124.   "*Directory where folders of mail are kept.")
  125.  
  126. (defvar vm-confirm-new-folders nil
  127.   "*Non-nil value causes interactive calls to vm-save-message
  128. to ask for confirmation before creating a new folder.")
  129.  
  130. (defvar vm-delete-empty-folders t
  131.   "*Non-nil value causes VM to remove empty (zero length) folder files
  132. after saving them.")
  133.  
  134. (defvar vm-flush-interval t
  135.   "*Non-nil value specifies how often VM flushes its cached internal
  136. data.  A numeric value gives the number of seconds between
  137. flushes.  A value of t means flush every time there is a change.
  138. Nil means don't do flushing until a message or folder is saved.
  139.  
  140. Normally when a message attribute is changed. VM keeps the record
  141. of the change in its internal memory and doesn't insert the
  142. changed data into the folder buffer until a particular message or
  143. the whole folder is saved to disk.  This makes normal Emacs
  144. auto-saving useless for VM folder buffers because the information
  145. you'd want to auto-save, i.e. the attribute changes, isn't in
  146. the buffer when it is auto-saved.
  147.  
  148. Setting vm-flsuh-interval to a numeric value will cause the VM's
  149. internal memory caches to be periodically flushed to the folder
  150. buffer.  This is done non-obtrusively, so that if you type
  151. something while flushing is occuring, the flush will abort
  152. cleanly and Emacs will respond to your keystrokes as usual.")
  153.  
  154. (defvar vm-visit-when-saving 0
  155.   "*Value determines whether VM will visit folders when saving messages.
  156. `Visiting' means that VM will read the folder into Emacs and append the
  157. message to the buffer instead of appending to the folder file directly.
  158. This behavior is ideal when folders are encrypted or compressed since
  159. appending plaintext directly to such folders is a ghastly mistake.
  160.  
  161. A value of t means VM will always visit folders when saving.
  162.  
  163. A nil value means VM will never visit folders before saving to them, and
  164. VM will generate an error if you attempt to save messages to a folder
  165. that is being visited.  The latter restriction is necessary to insure
  166. that the buffer and disk copies of the folder being visited remain
  167. consistent.
  168.  
  169. A value that is not nil and not t means VM will save to a folder's
  170. buffer if that folder is being visited, otherwise VM saves to the folder
  171. file itself.")
  172.  
  173. (defvar vm-auto-folder-alist nil
  174.   "*Non-nil value should be an alist that VM will use to choose a default
  175. folder name when messages are saved.  The alist should be of the form
  176. \((HEADER-NAME
  177.    (REGEXP . FOLDER-NAME) ...
  178.   ...))
  179. where HEADER-NAME and REGEXP are strings, and FOLDER-NAME is a string or an
  180. s-expression that evaluates to a string.
  181.  
  182. If any part of the contents of the message header named by HEADER-NAME
  183. is matched by the regular expression REGEXP, VM will evaluate the
  184. corresponding FOLDER-NAME and use the result as the default when
  185. prompting for a folder to save the message in.  If the resulting folder
  186. name is a relative pathname, then it will resolve to the directory named by
  187. vm-folder-directory, or the default-directory of the currently visited
  188. folder if vm-folder-directory is nil.
  189.  
  190. When FOLDER-NAME is evaluated, the current buffer will contain only the
  191. contents of the header named by HEADER-NAME.  It is safe to modify this
  192. buffer.  You can use the match data from any \\( ... \\) grouping
  193. constructs in REGEXP along with the function buffer-substring to build a
  194. folder name based on the header information.  If the result of
  195. evaluating FOLDER-NAME is a list, then the list will be treated as
  196. another auto-folder-alist and will be descended recursively.
  197.  
  198. Whether matching is case sensitive depends on the value of the variable
  199. vm-auto-folder-case-fold-search.")
  200.  
  201. (defvar vm-auto-folder-case-fold-search nil
  202.   "*Non-nil value means VM will ignore case when matching header
  203. contents while doing automatic folder selection via the variable
  204. vm-auto-folder-alist.")
  205.  
  206. (defvar vm-virtual-folder-alist nil
  207.   "*Non-nil value should be a list of virtual folder definitions.
  208. A virtual folder is a mapping of messages from one or more real folders
  209. into what appears to be a single folder.  A virtual folder definition
  210. specifes which real folders should be searched for prospective messages
  211. and what the inclusion criteria are.
  212.  
  213. Each virtual folder definition should have the following form:
  214.  
  215.   (VIRTUAL-FOLDER-NAME
  216.     ( (FOLDER-NAME ...)
  217.       (SELECTOR [ARG]) ... )
  218.     ... )
  219.  
  220. VIRTUAL-FOLDER-NAME is the name of the virtual folder being defined.
  221. This is the name by which VM will refer to this folder.
  222.  
  223. FOLDER-NAME should be the name of a real folder.  There may be more than
  224. one FOLDER-NAME listed, the SELECTORs within that sublist will apply to
  225. them all.  If FOLDER-NAME is a directory, VM will assume this to mean that
  226. all the folders in that directory should be searched.
  227.  
  228. The SELECTOR is a Lisp symbol that tells VM how to decide whether a message
  229. from one of the folders specifed by the FOLDER-NAMEs should be included
  230. in the virtual folder.  Some SELECTORs require an argument ARG; unless
  231. otherwise noted ARG may be omitted.
  232.  
  233. The recognized SELECTORs are:
  234.  
  235.    any       - matches any message.
  236.    author    - matches message if ARG matches the author; ARG should be a
  237.                regular expression.
  238.    header    - matches message if ARG matches any part of the header
  239.                portion of the message; ARG should be a regular expression.
  240.    recipient - matches message if ARG matches any part of the recipient list;
  241.                ARG should be a regular expression.
  242.    subject   - matches message if ARG matches any part of the message's
  243.                subject; ARG should be a regular expression.
  244.    text      - matches message if ARG matches any part of the text
  245.                portion of the message; ARG should be a regular expression.")
  246.  
  247. (defvar vm-virtual-mirror nil
  248.   "*Non-nil value causes the attributes of messages in virtual folders
  249. to mirror the changes in the attributes of the underlying real messages.
  250. Similarly, changes in the attributes of virtual messages will change the
  251. attributes of the underlying real messages.  A nil value causes virtual
  252. messages to have their own dinstinct set of attributes, apart from the
  253. underlying real message.
  254.  
  255. The value of vm-virtual-mirror is considered only at the time a
  256. virtaul folder is visited.  Changing the value of vm-virtual-mirror
  257. does not affect the behavior of existing virtual folders.")
  258.  
  259. (defvar vm-folder-read-only nil
  260.   "*Non-nil value causes a folder to be considered unmodifiable by VM.
  261. Commands that modify message attributes or messages themselves are disallowed.
  262. Commands that scan or allow the reading of messages are allowed but the
  263. `new' and `unread' message flags are not changed by them.")
  264.  
  265. (defvar vm-included-text-prefix " > "
  266.   "*String used to prefix included text in replies.")
  267.  
  268. (defvar vm-keep-sent-messages 1
  269.   "*Non-nil value N causes VM to keep the last N messages sent from within VM.
  270. `Keep' means that VM will not kill the VM mail buffer after you send a message
  271. with C-c C-c (vm-mail-send-and-exit).  A value of 0 or nil causes VM never
  272. to keep such buffers.  A value of t cuases VM never to kill such buffers.
  273.  
  274. Note that these buffers will vanish once you exit Emacs.  To keep a permanent
  275. record of your outgoing mail, use the mail-archive-file-name variable.")
  276.  
  277. (defvar vm-mail-header-from nil
  278.   "*Non-nil value should be a string that will be appear as the body
  279. of the From header in outbound mail messages.  A nil value means don't
  280. insert a From header.  This variable also controls the inclusion and
  281. format of the Resent-From header, when resending a message with
  282. vm-resend-message.")
  283.  
  284. (defvar vm-reply-subject-prefix nil
  285.   "*Non-nil value should be a string that VM should add to the beginning
  286. of the Subject header in replies, if the string is not already present.
  287. Nil means don't prefix the Subject header.")
  288.  
  289. (defvar vm-reply-ignored-addresses nil
  290.   "*Non-nil value should be a list of regular expressions that match
  291. addresses that VM should automatically remove from the recipient headers
  292. of replies.")
  293.  
  294. (defvar vm-in-reply-to-format "%i"
  295.   "*String which specifies the format of the contents of the In-Reply-To
  296. header that is generated for replies.  See the documentation for the
  297. variable vm-summary-format for information on what this string may
  298. contain.  The format should *not* end with a newline.
  299. Nil means don't put an In-Reply-To header in replies.")
  300.  
  301. (defvar vm-included-text-attribution-format "%F writes:\n"
  302.   "*String which specifies the format of the attribution that precedes the
  303. included text from a message in a reply.  See the documentation for the
  304. variable vm-summary-format for information on what this string may contain.
  305. Nil means don't attribute included text in replies.")
  306.  
  307. (defvar vm-forwarding-subject-format "forwarded message from %F"
  308.   "*String which specifies the format of the contents of the Subject
  309. header that is generated for a forwarded message.  See the documentation
  310. for the variable vm-summary-format for information on what this string
  311. may contain.  The format should *not* end with nor contain a newline.
  312. Nil means leave the Subject header empty when forwarding.")
  313.  
  314. (defvar vm-digest-preamble-format "\"%s\" (%F)"
  315.   "*String which specifies the format of the preamble lines gneerated by 
  316. vm-send-digest when it is invoked with a prefix argument.  See the
  317. documentation for the variable vm-summary-format for information on what
  318. this string may contain.  The format should *not* end with nor contain a
  319. newline.")
  320.  
  321. (defvar vm-digest-center-preamble t
  322.   "*Non-nil value means VM will center the preamble lines that precede
  323. the start of a digest.  How the lines will be centered depends on the
  324. ambient value of fill-column.   A nil value suppresses centering.")
  325.  
  326. (defvar vm-summary-format "%2n %*%a %-17.17F %-3.3m %2d %4l/%-5c \"%s\"\n"
  327.   "*String which specifies the message summary line format.
  328. The string may contain the printf-like `%' conversion specifiers which
  329. substitute information about the message into the final summary line.
  330.  
  331. Recognized specifiers are:
  332.    a - attribute indicators (always four characters wide)
  333.        The first char is  `D', `N', `U' or ` ' for deleted, new, unread
  334.        and read messages respectively.
  335.        The second char is `F', `W' or ` ' for filed (saved) or written
  336.        messages.
  337.        The third char is `R', `Z' or ` ' for messages replied to,
  338.        and forwarded messages.
  339.        The fourth char is `E' if the message has been edited, ` ' otherwise.
  340.    A - longer version of attributes indicators (six characters wide)
  341.        The first char is  `D', `N', `U' or ` ' for deleted, new, unread
  342.        and read messages respectively.
  343.        The second is `r' or ` ', for message replied to.
  344.        The third is `z' or ` ', for messages forwarded.
  345.        The fourth is `f' or ` ', for messages filed.
  346.        The fifth is `w' or ` ', for messages written.
  347.        The sixth is `e' or ` ', for messages that have been edited.
  348.    c - number of characters in message (ignoring headers)
  349.    d - numeric day of month message sent
  350.    f - author's address
  351.    F - author's full name (same as f if full name not found)
  352.    h - hour:min:sec message sent
  353.    i - message ID
  354.    l - number of lines in message (ignoring headers)
  355.    m - month message sent
  356.    M - numeric month message sent (January = 1)
  357.    n - message number
  358.    s - message subject
  359.    t - addresses of the recipients of the message, in a comma-separated list
  360.    T - full names of the recipients of the message, in a comma-separated list
  361.        If a full name cannot be found, the corresponding address is used
  362.        instead.
  363.    w - day of the week message sent
  364.    y - year message sent
  365.    z - timezone of date when the message was sent
  366.    * - `*' if the message is marked, ` ' otherwise
  367.  
  368. Use %% to get a single %.
  369.  
  370. A numeric field width may be specified between the `%' and the specifier;
  371. this causes right justification of the substituted string.  A negative field
  372. width causes left justification.
  373.  
  374. The field width may be followed by a `.' and a number specifying the maximum
  375. allowed length of the substituted string.  If the string is longer than this
  376. value it is truncated.
  377.  
  378. The summary format need not be one line per message but it must end with
  379. a newline, otherwise the message pointer will not be displayed correctly
  380. in the summary window.")
  381.  
  382. (defvar vm-auto-center-summary nil
  383.   "*Value controls whether VM will keep the summary arrow vertically
  384. centered within the summary window. A value of t causes VM to always
  385. keep arrow cenered.  A value of nil means VM will never bother centering
  386. the arrow.  A value that is not nil and not t causes VM to center the
  387. arrow only if the summary window is not the only existing window.")
  388.  
  389. (defvar vm-mail-window-percentage 75
  390.   "*Percentage of the screen that should be used to show mail messages.
  391. The rest of the screen will be used by the summary buffer, if displayed.")
  392.  
  393. (defvar vm-mutable-windows t
  394.   "*This variable's value controls VM's window usage.
  395.  
  396. A value of t gives VM free run of the Emacs display; it will commandeer
  397. the entire screen for its purposes.
  398.  
  399. A value of nil restricts VM's window usage to the window from which
  400. it was invoked.  VM will not create, delete, or use any other windows,
  401. nor will it resize its own window.
  402.  
  403. A value that is neither t nor nil allows VM to use other windows, but it
  404. will not create new ones, or resize or delete the current ones.")
  405.  
  406. (defvar vm-startup-with-summary nil
  407.   "*Value tells VM what to display when a folder is visited.
  408. Nil means display folder only, t means display the summary only.  A
  409. value that is neither t not nil means to display both folder and summary.
  410. The latter only works if the variable pop-up-windows's value is non-nil.
  411. See the documentation for vm-mail-window-percentage to see how to change how
  412. the screen is apportioned between the folder and summary windows.")
  413.  
  414. (defvar vm-follow-summary-cursor nil
  415.   "*Non-nil value causes VM to select the message under the cursor in the
  416. summary window before executing commands that operate on the current message.
  417. This occurs only when the summary buffer window is the selected window.")
  418.  
  419. (defvar vm-group-by nil
  420.   "*Non-nil value tells VM how to group message presentation.
  421. Currently, the valid non-nil values for this variable are
  422.   \"subject\", which causes messages with the same subject (ignoring
  423.     Re:'s) to be presented together,
  424.   \"author\", which causes messages with the same author to be presented
  425.     together,
  426.   \"recipient\", which causes messages with the same set of recipients to
  427.     be presented together,
  428.   \"date-sent\", which causes message sent on the same day to be
  429.     presented together,
  430.   \"physical-order\" which appears only for completeness, this is the
  431.     default behavior and is the same as nil.
  432.  
  433. The ordering of the messages in the folder itself is not altered, messages
  434. are simply numbered and ordered differently internally.")
  435.  
  436. (defvar vm-skip-deleted-messages t
  437.   "*Non-nil value causes VM's `n' and 'p' commands to skip over
  438. deleted messages.  A value of t causes deleted message to always be skipped.
  439. A value that is not nil and not t cuases deleted messages to be skipped only
  440. if there are other messages that are not flagged for deletion in the desired
  441. direction of motion.")
  442.  
  443. (defvar vm-skip-read-messages nil
  444.   "*Non-nil value causes VM's `n' and `p' commands to skip over
  445. messages that have already been read, in favor of new or unread messages.
  446. A value of t causes read messages to always be skipped.  A value that is
  447. not nil and not t causes read messages to be skipped only if there are
  448. unread messages in the desired direction of motion.")
  449.  
  450. (defvar vm-move-after-deleting nil
  451.   "*Non-nil value causes VM's `d' command to automatically invoke
  452. vm-next-message or vm-previous-message after deleting, to move
  453. past the deleted messages.")
  454.  
  455. (defvar vm-move-after-undeleting nil
  456.   "*Non-nil value causes VM's `u' command to automatically invoke
  457. vm-next-message or vm-previous-message after undeleting, to move
  458. past the undeleted messages.")
  459.  
  460. (defvar vm-delete-after-saving nil
  461.   "*Non-nil value causes VM automatically to mark messages for deletion
  462. after successfully saving them to a folder.")
  463.  
  464. (defvar vm-delete-after-archiving nil
  465.   "*Non-nil value causes VM automatically to mark messages for deletion
  466. after successfully auto-archiving them with the vm-auto-archive-messages
  467. command.")
  468.  
  469. (defvar vm-delete-after-bursting nil
  470.   "*Non-nil value causes VM automatically to mark messages for deletion
  471. after successfully bursting them with the vm-burst-digest command.")
  472.  
  473. (defvar vm-circular-folders 0
  474.   "*Value determines whether VM folders will be considered circular by
  475. various commands.  `Circular' means VM will wrap from the end of the folder
  476. to the start and vice versa when moving the message pointer or deleting,
  477. undeleting or saving messages before or after the current message.
  478.  
  479. A value of t causes all VM commands to consider folders circular.
  480.  
  481. A value of nil causes all of VM commands to signal an error if the start
  482. or end of the folder would have to be passed to complete the command.
  483. For movement commands, this occurs after the message pointer has been
  484. moved as far as possible in the specified direction.  For other commands,
  485. the error occurs before any part of the command has been executed, i.e.
  486. no deletions, saves, etc. will be done unless they can be done in their
  487. entirety.
  488.  
  489. A value that is not nil and not t causes only VM's movement commands to
  490. consider folders circular.  Saves, deletes and undelete commands will
  491. behave the same as if the value is nil.")
  492.  
  493. (defvar vm-search-using-regexps nil
  494.   "*Non-nil value causes VM's search command to interpret user input as a
  495. regular expression instead of as a literal string.")
  496.  
  497. (defvar vm-edit-message-mode 'text-mode
  498.   "*Major mode to use when editing messages in VM.")
  499.  
  500. (defvar vm-mode-hooks nil
  501.   "*List of hook functions to run when a buffer enters vm-mode.
  502. These hook functions should generally be used to set key bindings
  503. and local variables.  Mucking about in the folder buffer is certainly
  504. possible but it is not encouraged.")
  505.  
  506. (defvar vm-berkeley-mail-compatibility
  507.   (memq system-type '(berkeley-unix))
  508.   "*Non-nil means to read and write BSD Mail(1) style Status: headers.
  509. This makes sense if you plan to use VM to read mail archives created by
  510. Mail.")
  511.  
  512. (defvar vm-gargle-uucp nil
  513.   "*Non-nil value means to use a crufty regular expression that does
  514. surprisingly well at beautifying UUCP addresses that are substitued for
  515. %f and %t as part of summary and attribution formats.")
  516.  
  517. (defvar vm-strip-reply-headers nil
  518.   "*Non-nil value causes VM to strip away all comments and extraneous text
  519. from the headers generated in reply messages.  If you use the \"fakemail\"
  520. program as distributed with Emacs, you probably want to set this variable to
  521. to t, because as of Emacs v18.52 \"fakemail\" could not handle unstripped
  522. headers.")
  523.  
  524. (defvar vm-rfc934-forwarding t
  525.   "*Non-nil value causes VM to use char stuffing as described in RFC 934
  526. when packaging a message to be forwarded.  This will allow the recipient
  527. to use a standard bursting agent on the message and act upon it as if it
  528. were sent directly.")
  529.  
  530. (defvar vm-inhibit-startup-message nil
  531.   "*Non-nil causes VM not to display its copyright notice, disclaimers
  532. etc. when started in the usual way.")
  533.  
  534. (defvar mail-yank-hooks nil
  535.   "*List of hook functions called after yanking a message into a *mail*
  536. buffer.  See the documentation for the function vm-yank-message for details.")
  537.  
  538. (defvar vm-movemail-program "movemail"
  539.   "*Name of program to use to move mail from the system spool
  540. to another location.  Normally this shoul be the movemail program
  541. distributed with Emacs.")
  542.  
  543. (defvar vm-mode-map
  544.   (let ((map (make-keymap)))
  545.     (suppress-keymap map)
  546.     (define-key map "h" 'vm-summarize)
  547.     (define-key map "\M-n" 'vm-next-unread-message)
  548.     (define-key map "\M-p" 'vm-previous-unread-message)
  549.     (define-key map "n" 'vm-next-message)
  550.     (define-key map "p" 'vm-previous-message)
  551.     (define-key map "N" 'vm-Next-message)
  552.     (define-key map "P" 'vm-Previous-message)
  553.     (define-key map "\C-\M-n" 'vm-move-message-forward)
  554.     (define-key map "\C-\M-p" 'vm-move-message-backward)
  555.     (define-key map "\t" 'vm-goto-message-last-seen)
  556.     (define-key map "\r" 'vm-goto-message)
  557.     (define-key map "t" 'vm-expose-hidden-headers)
  558.     (define-key map " " 'vm-scroll-forward)
  559.     (define-key map "b" 'vm-scroll-backward)
  560.     (define-key map "\C-?" 'vm-scroll-backward)
  561.     (define-key map "d" 'vm-delete-message)
  562.     (define-key map "\C-d" 'vm-delete-message-backward)
  563.     (define-key map "u" 'vm-undelete-message)
  564.     (define-key map "U" 'vm-unread-message)
  565.     (define-key map "e" 'vm-edit-message)
  566.     (define-key map "j" 'vm-discard-cached-data)
  567.     (define-key map "k" 'vm-kill-subject)
  568.     (define-key map "f" 'vm-followup)
  569.     (define-key map "F" 'vm-followup-include-text)
  570.     (define-key map "r" 'vm-reply)
  571.     (define-key map "R" 'vm-reply-include-text)
  572.     (define-key map "\M-r" 'vm-resend-bounced-message)
  573.     (define-key map "B" 'vm-resend-message)
  574.     (define-key map "z" 'vm-forward-message)
  575.     (define-key map "c" 'vm-continue-composing-message)
  576.     (define-key map "@" 'vm-send-digest)
  577.     (define-key map "*" 'vm-burst-digest)
  578.     (define-key map "m" 'vm-mail)
  579.     (define-key map "g" 'vm-get-new-mail)
  580.     (define-key map "G" 'vm-group-messages)
  581.     (define-key map "v" 'vm-visit-folder)
  582.     (define-key map "V" 'vm-visit-virtual-folder)
  583.     (define-key map "s" 'vm-save-message)
  584.     (define-key map "w" 'vm-save-message-sans-headers)
  585.     (define-key map "A" 'vm-auto-archive-messages)
  586.     (define-key map "S" 'vm-save-folder)
  587.     (define-key map "|" 'vm-pipe-message-to-command)
  588.     (define-key map "#" 'vm-expunge-folder)
  589.     (define-key map "q" 'vm-quit)
  590.     (define-key map "x" 'vm-quit-no-change)
  591.     (define-key map "?" 'vm-help)
  592.     (define-key map "\C-_" 'vm-undo)
  593.     (define-key map "\C-xu" 'vm-undo)
  594.     (define-key map "!" 'shell-command)
  595.     (define-key map "<" 'vm-beginning-of-message)
  596.     (define-key map ">" 'vm-end-of-message)
  597.     (define-key map "\M-s" 'vm-isearch-forward)
  598.     (define-key map "=" 'vm-summarize)
  599.     (define-key map "L" 'vm-load-rc)
  600.     (define-key map "M" (make-sparse-keymap))
  601.     (define-key map "MN" 'vm-next-command-uses-marks)
  602.     (define-key map "Mn" 'vm-next-command-uses-marks)
  603.     (define-key map "MM" 'vm-mark-message) 
  604.     (define-key map "MU" 'vm-unmark-message)
  605.     (define-key map "Mm" 'vm-mark-all-messages)
  606.     (define-key map "Mu" 'vm-clear-all-marks)
  607.     (define-key map "M?" 'vm-mark-help)
  608.     (define-key map "W" (make-sparse-keymap))
  609.     (define-key map "WW" 'vm-apply-window-configuration)
  610.     (define-key map "WS" 'vm-save-window-configuration)
  611.     (define-key map "WD" 'vm-delete-window-configuration)
  612.     (define-key map "W?" 'vm-window-help)
  613.     (define-key map "\C-x\C-s" 'vm-save-buffer)
  614.     (define-key map "\C-x\C-w" 'vm-write-file)
  615.     (define-key map "\M-C" 'vm-show-copying-restrictions)
  616.     (define-key map "\M-W" 'vm-show-no-warranty)
  617.     map )
  618.   "Keymap for VM mode and VM Summary mode.")
  619.  
  620. (defvar vm-edit-message-mode-map
  621.   (let ((map (make-sparse-keymap)))
  622.     (define-key map "\C-c\e" 'vm-edit-message-end)
  623.     (define-key map "\C-c\C-c" 'vm-edit-message-end)
  624.     (define-key map "\C-c\C-]" 'vm-edit-message-abort)
  625.     (define-key map "\C-c\C-v" vm-mode-map)
  626.     map )
  627.   "*Keymap used while editing a message with vm-edit-message.
  628. This keymap is used in addition to the keymap used by the major mode
  629. specified by vm-edit-message-mode.")
  630.  
  631. ;; internal vars
  632. (defvar vm-mode-line-format
  633.   '("" (vm-buffer-modified-p vm-buffer-modified-p "-----")
  634.     ("VM " vm-version ": %b"
  635.      (vm-message-list
  636.       ("   " vm-ml-message-number
  637.        " (of " vm-ml-highest-message-number ")")
  638.       "  (no messages)"))
  639.     "   "
  640.     global-mode-string
  641.     (vm-message-list
  642.      ("   %[{" vm-ml-attributes-string "}%]----")
  643.      ("   %[%]----"))
  644.     (-3 . "%p") "-%-"))
  645. (defvar vm-folder-type nil)
  646. (make-variable-buffer-local 'vm-folder-type)
  647. (defvar vm-message-list nil)
  648. (make-variable-buffer-local 'vm-message-list)
  649. (defvar vm-virtual-buffers nil)
  650. (make-variable-buffer-local 'vm-virtual-buffers)
  651. (defvar vm-real-buffers nil)
  652. (make-variable-buffer-local 'vm-real-buffers)
  653. (defvar vm-message-pointer nil)
  654. (defvar vm-message-pointer nil)
  655. (make-variable-buffer-local 'vm-message-pointer)
  656. (defvar vm-folder-read-only nil)
  657. (make-variable-buffer-local 'vm-folder-read-only)
  658. (defvar vm-buffer-modified-p nil)
  659. (make-variable-buffer-local 'vm-buffer-modified-p)
  660. (defvar vm-message-order-changed nil)
  661. (make-variable-buffer-local 'vm-message-order-changed)
  662. (defvar vm-message-order-stuffed nil)
  663. (make-variable-buffer-local 'vm-message-order-stuffed)
  664. (defvar vm-last-message-pointer nil)
  665. (make-variable-buffer-local 'vm-last-message-pointer)
  666. (defvar vm-primary-inbox-p nil)
  667. (make-variable-buffer-local 'vm-primary-inbox-p)
  668. (defvar vm-visible-header-alist nil)
  669. (make-variable-buffer-local 'vm-visible-header-alist)
  670. (defvar vm-mail-buffer nil)
  671. (make-variable-buffer-local 'vm-mail-buffer)
  672. (defvar vm-summary-buffer nil)
  673. (make-variable-buffer-local 'vm-summary-buffer)
  674. (defvar vm-summary-pointer nil)
  675. (make-variable-buffer-local 'vm-summary-pointer)
  676. (defvar vm-system-state nil)
  677. (make-variable-buffer-local 'vm-system-state)
  678. (defvar vm-undo-record-list nil)
  679. (make-variable-buffer-local 'vm-undo-record-list)
  680. (defvar vm-undo-record-pointer nil)
  681. (make-variable-buffer-local 'vm-undo-record-pointer)
  682. (defvar vm-current-grouping nil)
  683. (make-variable-buffer-local 'vm-current-grouping)
  684. (defvar vm-last-save-folder nil)
  685. (make-variable-buffer-local 'vm-last-save-folder)
  686. (defvar vm-last-pipe-command nil)
  687. (make-variable-buffer-local 'vm-last-pipe-command)
  688. (defvar vm-messages-not-on-disk 0)
  689. (make-variable-buffer-local 'vm-messages-not-on-disk)
  690. (defvar vm-totals nil)
  691. (make-variable-buffer-local 'vm-totals)
  692. (defvar vm-modification-counter 0)
  693. (make-variable-buffer-local 'vm-modification-counter)
  694. (defvar vm-flushed-modification-counter nil)
  695. (make-variable-buffer-local 'vm-flushed-modification-counter)
  696. (defvar vm-checkpoint-modification-counter nil)
  697. (make-variable-buffer-local 'vm-checkpoint-modification-counter)
  698. (defvar vm-messages-needing-display-update nil)
  699. (make-variable-buffer-local 'vm-messages-needing-display-update)
  700. (defvar vm-numbering-redo-start-point nil)
  701. (make-variable-buffer-local 'vm-numbering-redo-start-point)
  702. (defvar vm-numbering-redo-end-point nil)
  703. (make-variable-buffer-local 'vm-numbering-redo-end-point)
  704. (defvar vm-summary-redo-start-point nil)
  705. (make-variable-buffer-local 'vm-summary-redo-start-point)
  706. (defvar vm-need-summary-pointer-update nil)
  707. (make-variable-buffer-local 'vm-need-summary-pointer-update)
  708. (defvar vm-deferred-message nil)
  709. (defvar vm-block-new-mail nil)
  710. (defvar vm-kept-mail-buffers nil)
  711. (defvar vm-inhibit-write-file-hook nil)
  712. (defvar vm-session-beginning t)
  713. (defvar vm-rc-loaded nil)
  714. (defvar vm-window-configurations nil)
  715. (defvar vm-window-configuration nil)
  716. (defconst vm-spool-directory
  717.   (or (and (boundp 'rmail-spool-directory) rmail-spool-directory)
  718.       "/usr/spool/mail/"))
  719. (defconst vm-attributes-header-regexp
  720.   "^X-VM-\\(Attributes\\|v5-Data\\):\\(.*\n\\([ \t]+.*\n\\)*\\)")
  721. (defconst vm-attributes-header "X-VM-v5-Data:")
  722. (defconst vm-message-order-header-regexp
  723.   "X-VM-Message-Order:\\(.*\n\\([ \t]+.*\n\\)*\\)")
  724. (defconst vm-message-order-header "X-VM-Message-Order:")
  725. (defconst vm-bookmark-header-regexp
  726.   "X-VM-Bookmark:\\(.*\n\\([ \t]+.*\n\\)*\\)")
  727. (defconst vm-bookmark-header "X-VM-Bookmark:")
  728. (defconst vm-vheader-header-regexp
  729.   "X-VM-VHeader:\\(.*\n\\([ \t]+.*\n\\)*\\)")
  730. (defconst vm-vheader-header "X-VM-VHeader:")
  731. (defconst vm-berkeley-mail-status-header "Status: ")
  732. (defconst vm-berkeley-mail-status-header-regexp "^Status: \\(..?\\)\n")
  733. (defconst vm-generic-header-regexp
  734.   "^\\([^: \t\n]+\\)[\t ]*:\\(.*\n\\([ \t]+.*\n\\)*\\)")
  735. (defconst vm-header-regexp-format "^%s:[ \t]*\\(.*\\(\n[ \t]+.*\\)*\\)")
  736. (defconst vm-supported-groupings-alist
  737.   '(("physical-order") ("subject") ("author") ("date-sent") ("recipient")))
  738. (defconst vm-supported-window-configurations
  739.   '(("composing-message") ("editing-message")
  740.     ("showing-message") ("paging-message") ("auto-next-message")
  741.     ("searching-folder")
  742.     ("end-of-message")
  743.     ("startup") ("summarize")))
  744. (defconst vm-attributes-vector-length 9)
  745. (defconst vm-cache-vector-length 16)
  746. (defconst vm-softdata-vector-length 4)
  747. (defconst vm-virtual-data-vector-length 9)
  748. (defconst vm-startup-message-lines
  749.       '("Mail bug reports to bug-vm@uunet.uu.net or post them to gnu.emacs.vm.bug"
  750.     "This is prerelease software.  Giving out copies of it means DEATH!"
  751.     "See Revelations 6:8 for full details"
  752.     "VM comes with ABSOLUTELY NO WARRANTY; type \\[vm-show-no-warranty] for full details"
  753.     "In Stereo (where available)"))
  754. ;    '("Mail bug reports to bug-vm@uunet.uu.net or post them to gnu.emacs.vm.bug"
  755. ;      "You may give out copies of VM.  Type \\[vm-show-copying-restrictions] to see the conditions"
  756. ;      "VM comes with ABSOLUTELY NO WARRANTY; type \\[vm-show-no-warranty] for full details"
  757. ;      "In Stereo (where available)"))
  758. (defconst vm-startup-message-displayed nil)
  759. ;; for the mode line
  760. (defvar vm-ml-message-number nil)
  761. (make-variable-buffer-local 'vm-ml-message-number)
  762. (defvar vm-ml-highest-message-number nil)
  763. (make-variable-buffer-local 'vm-ml-highest-message-number)
  764. (defvar vm-ml-attributes-string nil)
  765. (make-variable-buffer-local 'vm-ml-attributes-string)
  766.